// 使用cookie封装了对token的持久化储存
import Cookies from "js-cookie";
// 唯一的token
const TokenKey = "vue_admin_template_token"; //设置一个独一无二的key
const timeKey = "hrsaas-timestamp-key"; // 设置一个独一无二的key
export function getToken() {
  return Cookies.get(TokenKey);
}
// 存token
export function setToken(token) {
  return Cookies.set(TokenKey, token);
}
// 删除token
export function removeToken() {
  return Cookies.remove(TokenKey);
}
// 获取时间戳
export function getTimeStamp() {
  return Cookies.get(timeKey);
}
// 设置时间戳
export function setTimeStamp() {
  Cookies.set(timeKey, Date.now());
}
